package com.gxa.hotel.portal.controller;

import com.gxa.hotel.core.common.JsonResult;
import com.gxa.hotel.portal.service.HotelCacheService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@Api
@RequestMapping("/hotelCache")
public class HotelCacheController {
    @Autowired
    HotelCacheService hotelCacheService;

    @PostMapping("/info")
    public Map selectDetail(){
        String s = hotelCacheService.selectDetail();
        JsonResult jsonResult=new JsonResult();
        jsonResult.setCode("1");
        jsonResult.setData(s);
        return jsonResult.getMap();
    }
}
